import { createRouter, createWebHistory } from 'vue-router'
import Home from "@/components/views/Home.vue";
import ItemMusic from "@/components/views/ItemMusic.vue";
import MusicDetails from "@/components/details/MusicDetails.vue";

const routes=[
    {
        path:'/',
        name:'Home',
        component:Home
    },
    {
        //当路由配置出错时，界面将无法显示
        path: '/itemMusic',
        name:'ItemMusic',
        component: ItemMusic
    },
    {
        //当路由配置出错时，界面将无法显示
        path: '/MusicDetails',
        name:'MusicDetails',
        component: MusicDetails
    }
]

const router = createRouter({
    history: createWebHistory(process.env.BASE_URL),
    routes
})

export default router
